import numpy as np

np.random.seed(1)

b, w1, w2 = 0.35, 0.344, -0.58
b *= 100.
M = 200

x1_v = np.linspace(-100, 100, M, dtype=np.float32) + np.random.normal(0., 1., M)
x1_v *= 10.
X1 = x1_v.reshape([-1, 1])
x2_v = np.linspace(-100, 100, M, dtype=np.float32) + np.random.normal(0., 1., M)
x2_v *= 10.
X2 = x2_v.reshape([-1, 1])
X = np.concatenate([np.full(M, 1., dtype=np.float32).reshape([-1, 1]), X1, X2], axis=1)
W = np.array([b, w1, w2]).reshape([-1, 1])

Y = np.dot(X, W) + np.random.normal(0., 1., [M, 1]) * 10
y_v = Y.ravel()

if '__main__' == __name__:
    from mpl_toolkits import mplot3d
    import matplotlib.pyplot as plt

    fig = plt.figure(figsize=[6, 6])
    ax = plt.axes(projection='3d')

    ax.scatter3D(x1_v, x2_v, y_v)

    plt.show()
